Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSL: add System.regex_match() #7916

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Al2Klimov
Copy link
Member

fixes #7587

@Al2Klimov Al2Klimov added this to the 2.13.0 milestone Mar 17, 2020
@lippserd
Copy link
Member

With so many regex functions out there in every programming language we should be little bit more detailed in our documentation what the function does, i.e.

  • That it searches the whole string
  • That it supports group matching
  • That it stops after the first match?
  • How to use it in our configuration with some examples

Also, the function should just be named regex_match. Or do you have any objections?

Tests should be added as well.

And please check whether this solves https://community.icinga.com/t/regex-and-functions/2565

@lippserd lippserd self-requested a review March 20, 2020 10:19
Copy link
Member

@lippserd lippserd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment above. I posted it too quickly, sorry 😆

@Al2Klimov Al2Klimov self-assigned this Mar 24, 2020
@Al2Klimov Al2Klimov force-pushed the feature/extract-fields-from-strings-based-on-regex-7587 branch from f2f3ef0 to 9ff36ea Compare March 24, 2020 10:00
@Al2Klimov
Copy link
Member Author

  1. Done.
  2. Done.
  3. Done.
  4. Done.
  5. Yes, I have. The name I've chosen clearly indicates what exactly the function does.
  6. Done.
  7. Yes, it does.

@Al2Klimov Al2Klimov removed their assignment Mar 24, 2020
@Al2Klimov Al2Klimov requested a review from lippserd March 24, 2020 10:19
@lippserd
Copy link
Member

lippserd commented Jun 9, 2020

I still opt for regex_match. PHP's preg_match, Python's re.match, C++'s regex_match, ... do the same thing, right?

@lippserd lippserd added the needs feedback We'll only proceed once we hear from you again label Jun 9, 2020
@Al2Klimov
Copy link
Member Author

Fine.

@Al2Klimov Al2Klimov removed the needs feedback We'll only proceed once we hear from you again label Jun 9, 2020
@Al2Klimov Al2Klimov marked this pull request as draft June 9, 2020 08:40
@Al2Klimov Al2Klimov removed the request for review from lippserd June 9, 2020 08:40
@Al2Klimov Al2Klimov force-pushed the feature/extract-fields-from-strings-based-on-regex-7587 branch from 9ff36ea to fe109e0 Compare June 9, 2020 08:48
@Al2Klimov Al2Klimov removed their assignment Jun 9, 2020
@Al2Klimov Al2Klimov marked this pull request as ready for review June 9, 2020 09:27
@Al2Klimov Al2Klimov requested a review from lippserd June 9, 2020 09:27
@Al2Klimov Al2Klimov changed the title DSL: add System.regex_submatch() DSL: add System.regex_match() Jun 9, 2020
lippserd
lippserd previously approved these changes Jun 9, 2020
@Al2Klimov Al2Klimov force-pushed the feature/extract-fields-from-strings-based-on-regex-7587 branch from fe109e0 to 5030530 Compare December 14, 2020 17:35
@Al2Klimov Al2Klimov modified the milestones: 2.13.0, 2.14.0 Jun 2, 2021
@Al2Klimov
Copy link
Member Author

@cla-bot check

@cla-bot cla-bot bot added the cla/signed label Aug 4, 2021
@Al2Klimov Al2Klimov added the enhancement New feature or request label Aug 10, 2021
@julianbrost julianbrost removed this from the 2.14.0 milestone Jan 23, 2023
@Al2Klimov Al2Klimov force-pushed the feature/extract-fields-from-strings-based-on-regex-7587 branch from 5030530 to f0cf802 Compare January 31, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New function to extract fields from strings based on regex
3 participants